import React, {useRef}from 'react'
import One from './components/One.jsx'
export default function LayOut() {
    const inst = useRef(null)
    const inner = useRef(null)
    function reffun(){
        console.log(inst.current.innerHTML);
    }
   function refCom(){
    //    console.log(inner.current);
       inner.current.arr()
   }
    return (
        <div>
            <One ref={inner}></One>
            <button onClick={refCom}>点击</button>
            <p ref={inst}>1</p>
            <button onClick={reffun}>点击获取</button>
        </div>
    )
}

